home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-17 | 1002 b | 54 lines | [TEXT/CWIE] |
- // TaskSequencer.h
-
- #ifndef TaskSequencer_h
- #define TaskSequencer_h
-
- #ifndef Task_h
- #include "Task.h"
- #endif
- #ifndef TaskStep_h
- #include "TaskStep.h"
- #endif
- #ifndef TaskLife_h
- #include "TaskLife.h"
- #endif
-
- template < class Sequence >
- class TaskSequencer: private Task
- {
- public:
- typedef TaskStep<Sequence> Step;
- typedef TaskSequencer<Sequence> Sequencer;
-
- private:
- Sequence& sequence;
- Step step;
- bool dying;
-
- BoundMethod1< Sequencer, DeferredTaskTime > deferredCompletor;
- BoundMethod1< Sequencer, ApplicationTime > applicationCompletor;
- BoundMethod1< Sequencer, DeferredTaskTime > finishingCompletor;
-
- TaskLife life;
-
- void LaunchStep();
-
- virtual void Launch();
- virtual void Kill();
-
- void DeferredCompletor( DeferredTaskTime );
- void ApplicationCompletor( ApplicationTime );
- void FinishingCompletor( DeferredTaskTime );
-
- public:
- TaskSequencer( Sequence& );
-
- Task *Start( Step );
- };
-
- #ifndef TaskSequencer_cp
- #include "TaskSequencer.cp"
- #endif
-
- #endif
-